package pl.mchaniewski.ryneczek.services;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import pl.mchaniewski.ryneczek.pojo.Company;
import pl.mchaniewski.ryneczek.pojo.Portfolio;
import pl.mchaniewski.ryneczek.pojo.User;

public interface PortfolioService {

    public Portfolio save(Portfolio entity);

    public Portfolio findById(Integer portfolioid);

    public List<Portfolio> findByUserId(Integer userid);

    public List<Portfolio> findByUsername(String name);

    public Portfolio createNewPortfolio(User user, String name,
            BigDecimal balance);

    public Portfolio changeName(Integer portfolioid, String newName);

    public Integer getPortfolioCompanySharesAmount(Integer portfolioid,
            Integer comapanyid);

    public BigDecimal getPortfolioBlockedBalance(Integer portfolioid);

    public BigDecimal getPortfolioRealBalance(Integer portfolioid);

    public List<Company> getPortfolioCompanies(Integer portfolioid);

    public List<Company> getPortfolioCompanies(Integer portfolioid,
            boolean wasInLastUpdate);

    public Map<String, Object> getPortfolioCompanyInfo(Integer portfolioid,
            Company company);

    public List<Map<String, Object>> getPortfolioCompaniesInfo(
            Integer portfolioid);

    public Map<String, BigDecimal> getPortfolioAllStockValues(
            Integer portfolioid);

    public Map<String, BigDecimal> getPortfolioActiveStockValues(
            Integer portfolioid);

}
